﻿// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_INV_RETURN_IMPORT_ORDER
// * CreateDate    : 2013/1/16 21:30:29
// * Creater       : InvReturnImportOrderEntity
// * LastChangeDate: 2013/1/16 21:30:29
// * LastChanger   : 2013/1/16 21:30:29
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;

namespace ESOL.Common.Entity
{
    [Serializable]
    public partial class InvReturnImportOrderEntity : EntityBase
    {
        public InvReturnImportOrderTable TableSchema
        {
            get
            {
                return InvReturnImportOrderTable.Current;
            }
        }

        public InvReturnImportOrderEntity()
        {

        }

        public InvReturnImportOrderEntity(DataRow dr)
        {
            if (dr == null)
            {
                return;
            }
            this.Id = Convert.ToString(CommonFunctions.ToObject(dr["ID"]));
            this.ReturnOrderId = Convert.ToString(CommonFunctions.ToObject(dr["RETURN_ORDER_ID"]));
            this.OrderCode = Convert.ToString(CommonFunctions.ToObject(dr["ORDER_CODE"]));
            this.Created = Convert.ToDateTime(CommonFunctions.ToObject(dr["CREATED"]));
            this.CreatedBy = Convert.ToString(CommonFunctions.ToObject(dr["CREATED_BY"]));
            this.Modified = Convert.ToDateTime(CommonFunctions.ToObject(dr["MODIFIED"]));
            this.ModifiedBy = Convert.ToString(CommonFunctions.ToObject(dr["MODIFIED_BY"]));
            this.Approved = Convert.ToDateTime(CommonFunctions.ToObject(dr["APPROVED"]));
            this.ApprovedBy = Convert.ToString(CommonFunctions.ToObject(dr["APPROVED_BY"]));
            this.Status = Convert.ToString(CommonFunctions.ToObject(dr["STATUS"]));
            this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
        }

        public InvReturnImportOrderEntity(DataRowView dr)
        {
            if (dr == null)
            {
                return;
            }
            this.Id = Convert.ToString(CommonFunctions.ToObject(dr["ID"]));
            this.ReturnOrderId = Convert.ToString(CommonFunctions.ToObject(dr["RETURN_ORDER_ID"]));
            this.OrderCode = Convert.ToString(CommonFunctions.ToObject(dr["ORDER_CODE"]));
            this.Created = Convert.ToDateTime(CommonFunctions.ToObject(dr["CREATED"]));
            this.CreatedBy = Convert.ToString(CommonFunctions.ToObject(dr["CREATED_BY"]));
            this.Modified = Convert.ToDateTime(CommonFunctions.ToObject(dr["MODIFIED"]));
            this.ModifiedBy = Convert.ToString(CommonFunctions.ToObject(dr["MODIFIED_BY"]));
            this.Approved = Convert.ToDateTime(CommonFunctions.ToObject(dr["APPROVED"]));
            this.ApprovedBy = Convert.ToString(CommonFunctions.ToObject(dr["APPROVED_BY"]));
            this.Status = Convert.ToString(CommonFunctions.ToObject(dr["STATUS"]));
            this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return InvReturnImportOrderTable.Current;
            }
        }

        #region Perporty List
        public string Id
        {
            get { return Convert.ToString(GetData(InvReturnImportOrderTable.C_ID)); }
            set { SetData(InvReturnImportOrderTable.C_ID, value); }
        }

        public string ReturnOrderId
        {
            get { return Convert.ToString(GetData(InvReturnImportOrderTable.C_RETURN_ORDER_ID)); }
            set { SetData(InvReturnImportOrderTable.C_RETURN_ORDER_ID, value); }
        }

        public string OrderCode
        {
            get { return Convert.ToString(GetData(InvReturnImportOrderTable.C_ORDER_CODE)); }
            set { SetData(InvReturnImportOrderTable.C_ORDER_CODE, value); }
        }

        public DateTime Created
        {
            get { return Convert.ToDateTime(GetData(InvReturnImportOrderTable.C_CREATED)); }
            set { SetData(InvReturnImportOrderTable.C_CREATED, value); }
        }

        public string CreatedBy
        {
            get { return Convert.ToString(GetData(InvReturnImportOrderTable.C_CREATED_BY)); }
            set { SetData(InvReturnImportOrderTable.C_CREATED_BY, value); }
        }

        public DateTime Modified
        {
            get { return Convert.ToDateTime(GetData(InvReturnImportOrderTable.C_MODIFIED)); }
            set { SetData(InvReturnImportOrderTable.C_MODIFIED, value); }
        }

        public string ModifiedBy
        {
            get { return Convert.ToString(GetData(InvReturnImportOrderTable.C_MODIFIED_BY)); }
            set { SetData(InvReturnImportOrderTable.C_MODIFIED_BY, value); }
        }

        public DateTime Approved
        {
            get { return Convert.ToDateTime(GetData(InvReturnImportOrderTable.C_APPROVED)); }
            set { SetData(InvReturnImportOrderTable.C_APPROVED, value); }
        }

        public string ApprovedBy
        {
            get { return Convert.ToString(GetData(InvReturnImportOrderTable.C_APPROVED_BY)); }
            set { SetData(InvReturnImportOrderTable.C_APPROVED_BY, value); }
        }

        public string Status
        {
            get { return Convert.ToString(GetData(InvReturnImportOrderTable.C_STATUS)); }
            set { SetData(InvReturnImportOrderTable.C_STATUS, value); }
        }

        public string Remark
        {
            get { return Convert.ToString(GetData(InvReturnImportOrderTable.C_REMARK)); }
            set { SetData(InvReturnImportOrderTable.C_REMARK, value); }
        }

        #endregion
    }


}

